from django.conf.urls.defaults import *
from django.contrib.auth.views import login, logout
from myhomework.account.views import GroupView,UserView
from myhomework.common.views import CommonView
from myhomework.homework.views import HomeworkView
from myhomework.comment.views import *
from myhomework.download.download import *

urlpatterns = patterns('',
    (r'^my_group$',     GroupView.my_group),
    (r'^group_list_content$',     GroupView.group_list_content),
    (r'^group_count$',     GroupView.group_count),
    (r'^group_list$',     GroupView.group_list),
    (r'^create_group$',     GroupView.create_group),
    (r'^join_group$',   GroupView.user_join_group),
    (r'^quit_group$',   GroupView.user_quit_group),
    (r'^delete_group$',   GroupView.delete_group),
    (r'^quit_user$',   GroupView.admin_quit_user_from_group),
    (r'^change_administrator$',    GroupView.change_group_administrator),
    (r'^edit_group_name$',  GroupView.edit_group_name),
    
    
)

urlpatterns += patterns('',
    (r'^index$',     CommonView.index),
    (r'^edit_settings$',     CommonView.edit_settings),
    (r'^template$',     CommonView.get_template),
)

urlpatterns += patterns('',
    (r'^login$',  UserView.login_view),
    (r'^set_user_TA$',  UserView.set_user_TA),
    (r'^remove_user_TA$',  UserView.remove_user_TA),
    (r'^manage_user$',  UserView.manage_user),
    (r'^user_count$',  UserView.user_count),
    (r'^user_list_content$',  UserView.user_list_content),
    (r'^pass_user$',  UserView.pass_user),
    (r'^delete_user$',  UserView.delete_user),
    (r'^register$', UserView.create_user),
    (r'^edit_info$', UserView.edit_info),
    (r'^edit_password$', UserView.edit_password),
    (r'^logout$', logout),
)

urlpatterns += patterns('',
    (r'^create_homework$',  HomeworkView.create_homework),
    (r'^homework_list$',  HomeworkView.homework_list),
    (r'^homework_list_content$',  HomeworkView.homework_list_content),
    (r'^homework_count$',  HomeworkView.homework_count),
    (r'^show_homework$',  HomeworkView.show_homework),
    (r'^assess_homework$',  HomeworkView.assess_homework),
    (r'^submit_homework$',  HomeworkView.submit_homework),
    (r'^show_submited_homework$',  HomeworkView.show_submited_homework),
    (r'^my_homework_list$',  HomeworkView.my_homework_list),
    (r'^my_homework_list_content$',  HomeworkView.my_homework_list_content),
    (r'^my_homework_count$',  HomeworkView.my_homework_count),
)

urlpatterns += patterns('',
    (r'^create_comment$',  CommentView.create_comment),
    (r'^delete_comment$',  CommentView.delete_comment),
    (r'^get_comments$',  CommentView.get_comments),

)



urlpatterns += patterns('',
    (r'^download_score$',  DownloadView.download_score),
)